#include "ThreadPool.hpp"


int main()
{
   ThreadPool<int>* tp = new ThreadPool<int>(5);
   tp->Start();
   while(true)
   {
      //构建任务
      int x = rand() % 10 +  1;
      tp->Push(x);
      sleep(1);

      //交给线程池去处理
     std::cout << "main thread is running" << std::endl;
      
   }

    return 0;
}